package com.cgly.medical.service.impl;

import com.cgly.medical.domain.AppointmentTime;
import com.cgly.medical.mapper.AppointmentTimeMapper;
import com.cgly.medical.service.AppointmentTimeService;
import com.cgly.medical.util.Msg;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 黄浩然
 */
@Service
public class AppointmentTimeServiceImpl implements AppointmentTimeService {

    @Resource
    private AppointmentTimeMapper appointmentTimeMapper;

    @Override
    public Msg selectAppointmentTimeByDoctorId(Long doctorId) {
        AppointmentTime appointmentTime = appointmentTimeMapper.selectByDoctorId(doctorId);

        return Msg.success().data("appointmentTime",appointmentTime);
    }

    @Override
    public int addAppointmentTime(Integer doctorId) {

        int i = appointmentTimeMapper.addAppointmentTime(doctorId);
        return i;
    }
}
